<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8" />
		<meta name="author" content="菜鸟开发小组" />
		<meta name="keywords" content="Hyper IT,hyper it,it,hyper,IT 博客,博客,交流平台,IT交流网站,IT服务网站,菜鸟开发小组"/>
		<meta name="description" content="由菜鸟才发小组开发的一个苛求质量的高大上的IT服务网站，为IT技术圈内的大牛与小白提供了一个良好的技术交流平台。"/>
		<meta name="robots" content="all"/>
		<title>Hyper IT</title>
		 
		 <link rel="icon" href="img/logo2.ico" type="image/x-icon"/>
		 <link rel="stylesheet" type="text/css" href="css/common.css"/>
		 <link rel="stylesheet" type="text/css" href="css/checkBlog.css"/>
		 
		 <style>
		 	details summary::-webkit-details-marker { display:none; }
		 </style>
	</head>
	<body>
		<header>
			<div class="wrap">
				<div class="logo">
					<a href="index.html"><img src="img/logo.jpg" width="180" height="50"/></a>
				</div>
			</div>
		</header>
		<div class="main">
			<div class="wrap">
				<aside>
					<details open="open">
						<summary>用户管理</summary>
							<ul>
								<li><a href="allUsers.html">查看所有用户</a></li>
							</ul>
					</details>
					<details open="open">
						<summary>博文管理</summary>
							<ul>
								<li><a href="checkBlog.html">查看博文</a></li>
								<li><a href="checkNote.html">查看随笔</a></li>
							</ul>
					</details>
					<details open="open">
						<summary>商城管理</summary>
							<ul>
								<li><a href="goodsList.html">查看商品列表</a></li>
								<li><a href="newGoods.html">商品上新</a></li>
								<li><a href="order.html">订单详情</a></li>
							</ul>
					</details>
					<details open="open">
						<summary>职位管理</summary>
							<ul>
								<li><a href="position.html">查看职位</a></li>
							</ul>
					</details>
					<details open="open">
						<summary>标签管理</summary>
							<ul>
								<li><a href="tag.html">查看标签</a></li>
							</ul>
					</details>
					<details open="open">
						<summary>信息管理</summary>
							<ul>
								<li><a href="infoCenter.html">举报中心</a></li>
							</ul>
					</details>
				</aside>
				<section>
					<table id="infoCenter">
						<colgroup span="6">
							<col span="1" width="150"/>
							<col span="1" width="150"/>
							<col span="1" width="100"/>
							<col span="1" width="300"/>
							<col span="1" width="150"/>
							<col span="1" width="100"/>
						</colgroup>
						<tr>
							<th>举报人</th>
							<th>举报对象</th>
							<th>举报类型</th>
							<th>举报原因</th>
							<th>举报时间</th>
							<th>操作</th>
						</tr>
						
					</table>
				</section>
			</div>
		</div>
		<footer>
			<div class="wrap">
				<p>Copyright &copy; 2017-5-5 Hyper IT of 菜鸟开发小组 All Rights Reserved.</p>
			</div>
		</footer>
		
		<script src="js/jquery-3.2.1.min.js"></script>
		<script>
			$(document).ready(function(){
				initReport()
			});
			
			function showReport(reportList){
				for(var i = 0; i<reportList.length;i++){
					if(reportList[i].type == 0){
					$("#infoCenter").append('<tr><td>'+reportList[i].user_name+'</td><td>'+reportList[i].target_user_name+'</td><td>文章</td><td>'+reportList[i].reason+'</td><td>'+reportList[i].createtime.split(" ")[0]+'</td><td><a href="blogDetail.html?userDetail_id='+reportList[i].target_user_id+'&id='+reportList[i].target_id+'"><button>详情</button></a></td></tr>');
					}
					else{
					$("#infoCenter").append('<tr><td>'+reportList[i].user_name+'</td><td>'+reportList[i].target_user_name+'</td><td>随笔</td><td>'+reportList[i].reason+'</td><td>'+reportList[i].createtime.split(" ")[0]+'</td><td><button>详情</button></td></tr>')	
					}
				}
			}
			
			function initReport(){
				var url = "/HyperIT/blog/getReport";
				$.get(url,function(data){
					if(data.serviceResult){
						var reportList = data.resultParm.reportinfo;
						showReport(reportList);
					}
					else{
						alert(data.resultInfo);
					}
				});
			}
		</script>
	</body>
</html>
